package com.freesky.web.manager.remote.statistic;

import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.web.manager.remote.statistic.fallback.StatisticOrderRemoteFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "emall-provider-zuul", fallback = StatisticOrderRemoteFallback.class)
public interface StatisticOrderRemote {
    String ZUUL_URL_PREFIX = "/mysevice/order";
    String URL_PREFIX = "/statistic/order";

    @GetMapping(value =  ZUUL_URL_PREFIX + URL_PREFIX )
    JSONResponse countOrder(
            @RequestParam(value = "type") int type,
            @RequestParam(value = "startTime", required = false) String startTime,
            @RequestParam(value = "endTime", required = false) String endTime,
            @RequestParam(value = "year", required = false) int year);

}
